package com.lovesher.payment.service.resposity.mapper;

import java.util.List;

import com.lovesher.payment.service.resposity.base.Mapper;
import org.apache.ibatis.annotations.Param;

import com.lovesher.payment.common.resposity.bean.PaymentSerial;


/**
 * 
 * PaymentSerialMapper数据库操作接口类
 * 
 **/
public interface PaymentSerialMapper extends Mapper<PaymentSerial> {
	
	/**
	 * 根据编号查找收款单
	 * @return 收款单，若不存在则返回null
	 */
	public PaymentSerial findByOrderSn(@Param("orderSn")String orderSn,@Param("userId")Long userId);
	
	
	public PaymentSerial findByTradeNo(@Param("tradeNo")String tradeNo,@Param("userId")Long userId);


	public List<PaymentSerial> getListByStatus(@Param("taskStatus") Integer taskStatus,
			@Param("status") int status, @Param("start") Integer start, @Param("end") Integer end,
			@Param("paymentMethods") List<String> paymentMethods, @Param("secTime") Integer secTime);


	public PaymentSerial findByOrderSnAndType(@Param("orderSn")String orderSn,@Param("userId")Long userId,@Param("type")Integer type);
}